package com.example.backend.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.backend.entity.UserRole;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
/**
 * @Author Jcy
 * @Date 2022/4/14
 */
@Mapper
public interface UserRoleMapper extends BaseMapper<UserRole> {

    @Select("SELECT tb_user_role.role_id from tb_user_role WHERE tb_user_role.user_id =#{userId}")
    int getUserRole(@Param("userId") int userId);
}
